import request from '@/util/request.js';

/**
 * @description 根据button获取到的手机号code解码手机号
 * @param {Object} data
 */
export function savePhoneNumberByCode(data) {
	return request({
		url: '/user/getPhoneNew',
		method: 'GET',
		data
	})
}
/**
 * @description 获取openid
 * @param {Object} data
 */
export function getOpenid(data) {
	return request({
		url: '/user/getOpenid',
		method: 'GET',
		data
	})
}
/**
 * @description 选择账户
 * @param {Object} data
 */
export function selectAccount(data) {
	return request({
		url: '/user/appletLogin',
		method: 'GET',
		data
	})
}
/**
 * @description 微信支付
 * @param {Object} data
 */
export function updateMember() {
	return request({
		url: '/user/upVip',
		method: 'post',
	})
}
/**
 * @description 发送短信验证码
 * @param data
 * @returns {*}
 */
export function sendMessageCodeApi(data) {
	return request({
		url: '/user/sendVerificationCode',
		method: 'GET',
		data
	})
}
/**
 * @description 发送短信验证码
 * @param data
 * @returns {*}
 */
export function writeOffConsumptionOrderVoucher(data) {
	return request({
		url: '/consumptionOrder/writeOffConsumptionOrderVoucher',
		method: 'POST',
		data
	})
}
/**
 * @description 设置密码
 * @param data
 * @returns {*}
 */
export function resetPasswordApi(data) {
	return request({
		url: '/user/resetPassword',
		method: 'GET',
		data
	})
}
/**
 * @description 获取用户协议
 * @param data
 * @returns {*}
 */
export function getUserAgreement(data) {
	return request({
		url: '/article/miniList',
		method: 'GET',
		data
	})
}
/**
 * @description 线下核销
 * @param data
 * @returns {*}
 */
export function writeOffIntegralOrder(data) {
	return request({
		url: '/integralOrder/writeOffIntegralOrder',
		method: 'POST',
		data
	})
}